<?php/** * Submission Model * * @package  : CodeIgniter * @category : model * @author   : Oneplus <oneplus.lau@gmail.com> * @date     : 2011-06-18 */class Submission extends CI_Model {	function __construct() {		parent::__construct();	}		public function createSubmission($data) {		$this->db->insert('submissions', $data);		return $this->db->insert_id();	}		public function deleteSubmission($data) {		$this->db->delete('submissions', $data);		return $this->db->insert_id();	}		public function getSubmission($sid) {		$submission = $this->db->get_where('submissions', array('sid' => $sid));		return array(			'sid'  => $submission->row()->sid,			'uid'  => $submission->row()->uid,			'eid'  => $submission->row()->eid,			'auid' => $submission->row()->auid);	}}?>